Repository navigation
Conversation
|
The PR itself looks fine, but I have a more general question about whether we want to expose this funciton. Is there a reason to use Do we also document |
|
I don't have opinion on this. I was just going through issues and making PRs for the easy ones (and adding to my TODO list some hard ones). I'm tagging @WardBrian who created the issue, and @spinkney who was mentioned as spotting this issue |
|
I believe these were spotted by @spinkney because some downstream tools build a list of functions in our docs and use it for syntax highlighting, and these functions did not get highlighted correctly since they were not documented. That being said, @bob-carpenter makes two good points:
No, they generate exactly the same C++
Also no |
|
I think we should be consistent and either document all of these as named functions or none of them. A middle ground might be to add a table in the operators section that lists the named equivalents. Most of these functions are hugely overloaded, so adding them all will be a lot of signatures to document. |
Submission Checklist
quarto renderto HTML ofmatrix_operations.qmd,complex_matrix_operations.qmdandfunctions_index.qmd, Quarto 1.8.26)<<{ since VERSION }>>Summary
Fixes #908.
Claude did this by getting function signatures from stanc3, and tested also that all signatures compile. Since versions Claude checked from git.
matrix_operations.qmd, section "Matrix division operators and functions":mdivide_right(row_vector b, matrix A),mdivide_right(matrix B, matrix A),mdivide_left(matrix A, vector b)andmdivide_left(matrix A, matrix B). These are the function forms of/and\. All four signatures are infunction_signatures.hof Stan 2.0.0, so they are markedsince 2.0.mdivide_left_spdentries had their return types swapped:(matrix A, vector b)showedmatrix, and(matrix A, matrix B)showedvector. They now showvectorandmatrix, as in stanc.operator\entries said "The left division of A by b". They now say "The left division of b by A", as themdivide_left_tri_lowandmdivide_left_spdentries do.complex_matrix_operations.qmd, section "Complex matrix division operators and functions":mdivide_right(complex_row_vector b, complex_matrix A)andmdivide_right(complex_matrix B, complex_matrix A). stanc 2.30.0 added these signatures together with the complexoperator/, which is already documented, so they are markedsince 2.30. There is no complexmdivide_left.functions_index.qmdis regenerated withgen_index.py. The new and changed index entries link to the anchors thathtml-index.luaproduces: I checked the SHA-1 of each new or changed signature comment against the regenerated index.Check: each
mdivide*signature instanc --dump-stan-math-signatures(stanc3 v2.40.0) is now documented, and each documentedmdivide*signature is in stanc.Copyright and Licensing
Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company):
Aalto University
By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses: